1. Field of the Invention
The present invention relates to an image status detecting apparatus detecting a status of an image (particularly a document image) inputted through an image input device such as a scanner and relates to a document image correcting apparatus correcting an image inputted through an image input device into an erecting image. Particularly, the present invention relates to a document image correcting apparatus detecting a direction of a document by detecting a rotated angle and an existence of mirroring (reflected-inversion) of a character among characters inputted in a state that these are rotated and mirrored (reflectively inverted).
2. Description of the Related Art
In late years, as an image scanner is used as an input device for a document image. Small handy scanners for manual operation, which are carried easily, are developed and manufactured in addition to fixed-flatbed scanners which are conventional image scanners.
As to handy scanners, an user can scan in any direction, namely, an user can use a handy scanner flexibly. However, there are cases in that a rotated image and a mirrored image are read as images due to a reading (scanning) direction which is a relative direction between a sheet and a scanner, therefore, it is necessary to correct the image by rotating or rotating after scanning. For example, this case occurs when a document written horizontally is read from the top of the document.
Further, there is a possibility in that a whole document is mirrored and inputted. In a document written horizontally, a sentence is usually written from left to right. When this document is scanned from right to left, the inputted characters are mirrored characters. Such mirroring occurs when a back and a face of a permeable sheet such as an OHP sheet is reversed in spite of a fixed-flatbed scanner.
Thus, when a process such as character recognition is applied to the inputted document image, the document is not inputted in a proper direction and an accuracy of the character recognition lowers in a case that a character is rotated and mirrored, therefore, it is necessary to correct the document image into an erecting image after inputting document image in order to direct the document read in this way to a correct direction.
There are conventional document image erecting method such as Japan Patent Application Laid-Open 8-212298 and Japan Patent Application Laid-Open 7-28945.
Japan Patent Application Laid-Open 8-212298 discloses, as shown in FIG. 31, a technique in which an inputted character is recognized from four directions such as angles of 0xc2x0, 90xc2x0, 180xc2x0 and 270xc2x0, an accuracy value of the character recognition is obtained, and the direction having the highest accuracy value is judged as the document direction.
However, Japan Patent Application Laid-Open 8-212298 gives no description that a mirrored character is corrected. For example, though a symmetric character is read conversely, there is a high possibility in that the apparatus recognizes this character as normal. Further, the accuracy value is obtained from the character recognition result regardless of the reading direction, therefore, there is a case that the accuracy value becomes higher than a character read in a correct direction.
Japan Patent Application Laid-Open 7-28945 discloses a technique, in which a character is unsuitable to judge the direction of document, such as a left-right symmetric character, a upside-down symmetric character, a point symmetric character, a character which looks like another character when turned upside down, a character which looks like another character when mirrored, therefore, when this character is clipped, the clipping process is re-executed.
The present invention is developed in order to solve this problem, and has its object to provide a document image correcting apparatus detecting a status of a document image inputted through an input device such as a scanner with an image status detecting apparatus, and automatically correcting document images into a proper image even if a rotated document image, a reversed document image or a rotated/mirrored image.
The present invention has another object to determine a character to be extracted based on a specific condition when a character is extracted in order to use only specific kinds of characters for judging the rotation and the mirroring of the document. Concretely, characters used for judgment are selected by using a value of which a standard value varies in accordance with a kind of a character, such as a length-breath ratio, a black (white) pixel ratio and a pixel size.
The present invention adapts the following in order to solve the above-described problem.
The first aspect of the present invention is an image status detecting apparatus detecting whether or not a character image inputted through an image input unit is mirrored horizontally or vertically and/or what degree the character image is rotated compared with an original character. The image status detecting apparatus comprises an image converting unit for rotating and for mirroring the character image inputted through the image input unit; a character recognizing unit for referring a character recognition dictionary storing character feature information and for obtaining candidate characters resemble to the character image mirrored and rotated by the image converting unit and a recognition rate indicating a degree of recognition certainty; and a conversion procedure detecting unit for detecting, based on the candidate characters and the recognition rate obtained by the character recognizing unit, a rotation angle and an existence of mirroring needed to direct the character image to a proper direction.
The second aspect of the present invention is a document image correcting apparatus using this image status detecting apparatus. The document image correcting apparatus comprises a character image storing unit for storing a character image inputted through image input unit; an image status detecting unit for detecting whether or not the character image stored in the character image storing unit is mirrored and what degree the character image is rotated compared with an original character; and an image correcting unit for directing the character image stored in the character image storing means to the proper direction based on a detected result of the image status detecting means.
Further, the image status detecting units may comprise an image converting unit for rotating and for mirroring the character image inputted through the image input unit; a character recognizing unit for referring a character recognition dictionary storing character feature information and for obtaining candidate characters resemble to the character image mirrored and rotated by the image converting unit and a recognition rate indicating a degree of recognition certainty; and a conversion procedure detecting unit for detecting, based on the candidate characters and the recognition rate obtained by the character recognizing means, a rotation angle and an existence of mirroring needed to direct the original character image to a proper direction.
In these aspects, a scanner, more particularly, a hand-held scanner is generally used as the image input unit. A document image including a line (and lines) of plural characters is read by the scanner. Then, it is preferable that the document image is temporarily stored in the document image storing unit (such as a memory) and then at one or more specific character is extracted from the document image and is stored in the character image storing unit (such as a memory).
When a hand-held scanner is used, the read image is mirrored in a case that the scanning direction differs from the original document direction. Thus, the image status detecting unit detects whether or not the character image stored in the character image storing unit is mirrored as to the original character. When the image status detecting unit judges that the character image is mirrored, the image correcting unit makes the character image stored in the character storing unit erecting.
The image status detecting unit also detects what degree the character image is rotated compared with an original character. The image correcting unit directs the character image stored in the character storing unit to a proper direction in accordance with the detected result of the image status detecting unit. Moreover, the image can be corrected by combining the mirroring and rotation.
In these aspects, document image correcting apparatus may comprise a document image storing unit for storing a document image including a character line which consists of plural characters inputted through the image input unit; and a character image extracting unit for extracting at least one character image from the document image inputted through the input image unit. In this case, the character image storing unit stores the character extracted by the character image extracting unit, and the image correcting unit corrects the document image stored in the document image storing unit to a proper image in a specified direction in accordance with a detected result of the image status detecting unit.
Further, the document image correcting apparatus may comprise a conversion controlling unit for controlling the image converting unit. That is, when the detected result is different from a predetermined result, conversion by the image converting unit is varied, and then the character recognition is tried again based on the varied conversion, whereby capable of recognizing a character speedily.
The conversion procedure detecting unit may detect a rotated angle and/or an existence of mirroring in a case that the recognition rate of the character image obtained by the character recognizing unit becomes maximum among all combinations of rotation and mirroring executed by the image converting unit.
The conversion procedure detecting unit may detect a rotated angle and an existence of mirroring when the recognition rate obtained by the character recognizing means is over a predetermined value.
The conversion controlling unit may control the image converting unit so that the character image is converted in a state that rotation and mirroring are combined in a specified order. For example, priority is given to a direction in which scanning is executed frequently.
The conversion controlling unit may control the image converting unit so that the character image is converted in accordance with only a specified combination of rotation and mirroring among plural combinations of rotated angles and mirroring. A case is assumed in that scanning is executed in only specific directions.
The conversion controlling unit may control the image converting unit so that the character image is converted in order of high frequency among combinations of rotated angles and mirroring which previously direct character images to the proper direction. This function is used to learn a habit of a personal for scanning.
The conversion controlling unit may control the image converting unit so that a character image is rotated every predetermined angle (such as 0xc2x0, 90xc2x0, 180xc2x0 and 270xc2x0 while mirrored.
The image correcting unit does not correct character images not satisfying a specified condition as a result of character recognition as to all character images converted by said image converting means.
The present invention may be an image status detecting method comprising: an image converting step of rotating and/or of mirroring the character image inputted through the image input tool; a character recognizing step of referring a character recognition dictionary storing character feature information and of obtaining candidate characters resemble to the character image mirrored and rotated in the image converting step and a recognition rate indicating resemblance; and a conversion procedure detecting step of detecting, based on the candidate characters and the recognition rate a recognized result in the character recognizing step, a rotation angle and an existence of mirroring needed to direct the original character image to a proper direction.
The present invention may be a document image correcting method comprising: a character image storing step of storing a character image inputted through an image input tool; an image status detecting step of detecting whether or not the character image stored in the character image storing step is mirrored and what degree the character image is rotated compared with an original character; and an image correcting step of making the character image stored in the character image storing step erecting based on a detected result of the image status detecting step.
The present invention may be a computer readable medium storing a program. The program comprises an image converting step of rotating and of mirroring the character image inputted through the image input tool; a character recognizing step of referring a character recognition dictionary storing character feature information and of obtaining candidate characters resemble to the character image mirrored and rotated in the image converting step and a recognition rate indicating resemblance; and a conversion procedure detecting step of detecting, based on the candidate characters and the recognition rate a recognized result in the character recognizing step, a rotation angle and an existence of mirroring needed to direct the original character image to a proper direction.
The present invention may be a computer readable medium storing a program. The program comprises a character image storing step of storing a character image inputted through an image input tool; an image status detecting step of detecting whether or not the character image stored in the character image storing step is mirrored and what degree the character image is rotated compared with an original character; and an image correcting step of making the character image stored in the character image storing step erecting based on a detected result of the image status detecting step.
The third aspect of the present invention is a document image correcting apparatus comprising a character image extracting unit for extracting a character image satisfying a predetermined condition from an inputted document image; and a character direction detecting unit for detecting a rotation and an existence of mirroring as to the character image extracted by the character image extracting unit.
The predetermined condition may be a ratio of a number of black pixels to a number of pixels, a length ratio of a long side to a short side, or at least one of a number of pixels in a lengthwise direction and a number of pixels in a horizontal direction in the character image extracted by the character image extracting unit.
The character image extracting unit, when a character image having a high symmetry appears, does not clip the character image.
The character direction detecting means may apply a character recognition to the character image extracted by the character image extracting unit, and when a candidate character obtained as a result of the character recognition is coincident with a predetermined character, does not detect a direction of the character image.
The fourth aspect of the present invention is a document image correcting apparatus comprising a character image extracting unit for selectively extracting a character image satisfying a predetermined condition from an inputted document image; a character image converting unit for applying a rotation process at a predetermined angle to the character image extracted by the character image extracting unit, for applying the rotation process to the character image after applying a mirroring process, and for outputting the character image to which the rotation process and the mirroring process are applied; a character recognizing means for executing a character recognition as to each direction of the character image outputted from the character image converting unit; and a document direction determining unit for determining a direction of the inputted document image based on a result of the character recognition executed by the character recognizing unit.
In the present invention, the character recognizing unit outputs reliability information indicating an accuracy of the character recognition process as to each direction of the character image outputted from the character image converting unit, and the document direction determining unit determines the direction of the inputted document image based on the reliability information of the character image outputted from said character recognizing unit.
The document direction determining unit may detect a maximum reliability information among the reliability information inputted from said character recognizing means and determines the direction of the inputted document image based on the maximum reliability information.
The document direction determining unit may compare the reliability information inputted from the character recognizing unit with a predetermined threshold, and executes no document direction determination based on the character image when no reliability information exceeds the predetermined threshold as to each direction of the character image. The document direction determining unit may compare the reliability information inputted from the character recognizing unit with a predetermined threshold, and executes no document direction determination based on the character image when a number of reliability information exceeds a predetermined number.
The document direction determining unit may detect directions of characters as to plural character images and determines the direction of the document image based on the directions which are detected.
The document direction determining unit may calculate an average of reliability of each character in each character direction as to plural character images, and determines the direction of the document image based on the average.
The document direction determining unit may determine a character direction obtaining a most number of maximum reliability among character directions having plural maximum reliability of each character image as a document direction.
The document direction determining unit, when maximum reliability are obtained more than a predetermined number as to a character direction, determines the character direction as a document image direction.
The present invention may be document image correcting method comprising: a step of extracting a character image satisfying a predetermined condition from an inputted document image; and a step of judging a rotation and an existence of mirroring as to the character image which is selectively extracted.
The present invention may be a document image correcting method comprising: a step of selectively extracting a character image satisfying a predetermined condition from an inputted document image; a step of applying a rotation process at a predetermined angle to the character image which is selectively extracted and of applying the rotation process to the character image after applying a mirroring process; a step of outputting the character image to which the rotation process and the mirroring process are applied; a step of executing a character recognition as to each direction of the character image which is outputted; and a step of determining a direction of the inputted document image based on a result of the character recognition.
The present invention may be an information storage medium storing a program. The program comprises a step of extracting a character image satisfying a predetermined condition from an inputted document image; and a step of judging a rotation and an existence of mirroring as to the character image which is selectively extracted.
The present invention may be an information storage medium storing a program; said program comprises a step of selectively extracting a character image satisfying a predetermined condition from an inputted document image; a step of applying a rotation process at a predetermined angle to the character image which is selectively extracted and of applying the rotation process to the character image after applying a mirroring process; a step of outputting the character image to which the rotation process and the mirroring process are applied; a step of executing a character recognition as to each direction of the character image which is outputted; and a step of determining a direction of the inputted document image based on a result of the character recognition.
The present invention may be a status detecting apparatus detecting what status a document image inputted through an image input unit is as to a proper direction. The status detecting apparatus comprises a image converting means for producing a rotated image or a mirrored image from the document image inputted through the image input unit; a character recognizing unit for applying a character recognition process to each character included in the rotated image and the mirrored image produced by the image converting unit; and a conversion procedure detecting unit for arranging the document image inputted through the image input unit in the proper direction based on an image direction of which a character recognition rate is highest among the rotated image and the mirrored image as a result of character recognition by the character recognizing unit.
The present invention may be a document image correcting apparatus comprising: an input unit for inputting a document image; a selecting unit for selecting a character image from the document image inputted through the input unit; a judging unit for judging which direction the selected character image is inputted as to a standard direction; and an arranging unit for arranging all of the inputted document image into the standard direction based on the judged direction.
The present invention may be a document image correcting apparatus comprising: an input unit for inputting a document image; a judging unit for judging the inputted document image and an existence of mirroring as to a standard direction; and an applying unit for applying a process including mirroring to the document image based on a direction of the document image which is judged.
The present invention may be a document image correcting method comprising: a step of inputting a character; a step of rotating the inputted character in a plurality directions and of mirroring the character rotated in each direction; a step of executing character recognition as to the rotated and mirrored character; a step of selecting a character of which a recognition rate of the character recognition is highest; and a step of converting the inputted character into a proper direction based on a rotation direction and an existence of mirroring of the selected character.
The above-described elements may be combined in any way.